package com.online.olsrootserver.controller;

import com.online.olsrootserver.entity.Faq;
import com.online.olsrootserver.service.FaqService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * Created by littleheng on 2018/5/3
 */
@RestController
@RequestMapping("/faq")
public class FaqController {

    @Autowired
    private FaqService faqService;

    @RequestMapping(value = "/getFaqsByCompanyId", method = RequestMethod.GET)
    public List<Faq> getFaqsByCompanyId(@RequestParam("companyId")String companyId) {
        return this.faqService.getFaqList(companyId);
    }
}